package ProjectTeam39.Domains;
public class Nurse extends User {
	AppointmentCalender ac;
	UserList ul;
	Gender g;
	
	public Nurse(String name, String username, String password, long phoneNum, String address, AppointmentCalender ac, UserList ul){
		this.ac = ac;
		this.ul = ul;
		this.phoneNumber = phoneNum;
		this.address = address;
		this.name = name;
		this.username = username;
		this.password = password;
		this.isDoctor = false;
	}
	
	public boolean createPatient(String name, short phoneNum, String address, MedicalInfo minfo, String username, String pw){
		Patient p = new Patient(name,phoneNum,address,minfo,username,pw);
		Clientelle c = ul.getClientelle();
		boolean didItWork = c.createClient(p);
		return didItWork;
	}
	
	public boolean removePatient(String patientname){/* needs work */
		Clientelle patients = ul.getClientelle();
		boolean didItWork = patients.deletePatient(patientname);
		return didItWork;
	}
	
	public Patient viewPatient(String patientname){
		Clientelle patients = ul.getClientelle();
		return patients.getPatient(patientname);
	}
	
	public boolean createTreatmentRecord(Patient p, Appointment date, Doctor treatingDoctor,
										Nurse attendingNurse, DoctorsOrders docorders,
										int height, int weight, int temp, int bloodPressure, String symptoms)
	{
		try
		{
			TreatmentRecord tr = new TreatmentRecord(date,treatingDoctor,attendingNurse,docorders, height, weight,
									temp,bloodPressure,symptoms);
			p.getMedicalInfo().addTreatment(tr);
		}
		catch(Exception e)
		{
			return false;
		}
		return true;
	}
	

}//end class